<?php
if(!defined('ADMIN')){
	exit('Access Denied');
}
if($_POST["sub"]=="save"){
    $jobsid=intval($_POST["jobsid"]);
    
    $jinfo=$ezhand->select("hr_interview","*","id=".$jobsid);
    $dtoday=date("Y-m-d");
    $companyid=$jinfo["companyid"];
    if(empty($jinfo)){
        
        jumpajax('300','没找到对应的面试信息！','');
    }
    $ulist=array(
    "status"=>2
    );
    
    $ezhand->update(hr_interview,$ulist,'id="'.$jobsid.'"');
    
    jumpajax('200','面试确认信息发送成功！','','closeCurrent');
    
}elseif($_POST["sub"]=="unsave"){
    
     $jobsid=intval($_POST["jobsid"]);
    
    $jinfo=$ezhand->select("hr_interview","*","id=".$jobsid);
    $dtoday=date("Y-m-d");
    $companyid=$jinfo["companyid"];
    if(empty($jinfo)){
        
        jumpajax('300','没找到对应的面试信息！','');
    }
    $ulist=array(
    "status"=>4
    );
    
    $ezhand->update(hr_interview,$ulist,'id="'.$jobsid.'"');
    
    jumpajax('200','取消面试发送成功！','','closeCurrent');   
}

$tid=intval($_GET["id"]);
if(empty($tid)){
    jumpajax('300','面试信息没找到！','');
}
$info=$ezhand->select('hr_interview t,company c',"t.*,c.title as companyname",'t.companyid=c.tid and t.id='.$tid.' ');
if(empty($info)){
    jumpajax('300','信息没找到！','');
}





?>